export default {
    // 更新菜单信息
    UpdateMenus(state, data) {
        state.menus = data;
    },
    //添加tab
    addTab(state, tab) {
        let index = state.editableTabs.findIndex(e => e.name === tab.path)
        if (index === -1) {
            state.editableTabs.push({
                title: tab.name,
                name: tab.path,
            });
        }
        state.editableTabsValue = tab.path;
    },
    // 控制：侧边菜单的显示折叠
    updateSideMenuIsCollapse(state, data) {
        state.SideMenuIsCollapse = data;
    },
    // 控制：侧边菜单的显示隐藏
    updateSideMenuIsHidden(state, data) {
        state.SideMenuIsHidden = data;
    },
    initTab(state) {
        state.editableTabsValue = 'processinstance',
            state.editableTabs = [{
                title: '流程实例',
                name: 'processinstance',
            }]
    },
}